import java.util.Arrays;
import java.util.Comparator;
/*class Array<T>{
      public  Object[] array = new Object[10];
      public  void  set(int pos ,T val){
          array[pos] = val;
      }


      public T get(int pos){
          return (T)array[pos];
      }
}*/
/*
class Alg<T extends Comparable<T>>{
    public T findmax(T[] array){
        T max = array[0];
        for (int i = 1; i < array.length; i++) {
            if(array[i].compareTo(max)>0){
                 max = array[i];
            }
        }
        return  max;
    }

}

class A implements Comparable<A>{

    @Override
    public int compareTo(A o) {
        return 0;
    }
}*/
import  java.util.Scanner;
import  java.util.*;
/*public class Test {
        public int solve (String s) {
            char[] chars = s.toCharArray();
            Stack<Integer> numStack = new Stack<>();//运算数
            Stack<Character> operatorStack = new Stack<>();//运算符
            for(int i=0;i<chars.length;i++){
                char curchar = chars[i];
                if(isDight(curchar)){//数字
                    int num = 0;
                    while(i<chars.length && isDight(chars[i])){//循环读取当前数字(多位)
                        num = num*10+(chars[i]-'0');
                        i++;
                    }
                    i--;//将i-1当前指针指向当前数的最后一位
                    numStack.push(num);//数字入栈
                }else if(curchar=='('){//'('入栈
                    operatorStack.push(curchar);
                }else if(curchar==')'){//遇到')'开始运算()内的表达式
                    while(operatorStack.peek()!='('){//多个()嵌套处理
                        operate(numStack,operatorStack);
                    }
                    operatorStack.pop();// '('出栈
                }else {
                    while(!operatorStack.isEmpty() && getPriority(curchar)
                            <= getPriority(operatorStack.peek()) ){//当前优先级<栈内优先级
                        operate(numStack,operatorStack);//提取表达式计算
                    }
                    operatorStack.push(curchar);//当前运算符入栈
                }
            }

            while(!operatorStack.isEmpty()){//运算符不为空,继续计算
                operate(numStack,operatorStack);
            }
            return numStack.pop();//返回最后结果

        }

        private int getPriority(Character character) {//优先级
            if(character == '+' || character=='-'){
                return 1;
            }else if(character =='*' || character =='/'){
                return 2;
            }
            return -1;//遇见'()'的优先级
        }

        private void operate(Stack<Integer> numStack, Stack<Character> operatorStack) {//提取当前表达式计算
            char operator = operatorStack.pop();
            int rightnum = numStack.pop();
            int leftnum = numStack.pop();
            int newnum = compute(leftnum,operator,rightnum);//计算
            numStack.push(newnum);//添加运算结果入栈
        }

        private int compute(int a, char operator, int b) {
            switch (operator){
                case '+': return a + b;
                case '-': return a-b;
                case '*': return a*b;
                case '/':
                    if(b==0){
                        throw new RuntimeException("cannot not divide 0!");
                    }
                    return a/b;
                default :
                    throw new UnsupportedOperationException();

            }
        }

        private boolean isDight(char curchar) {
            return curchar>='0' && curchar <='9';
        }*/

   /* public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s1 = in.nextLine();
        String[] s3 =s1.split("&");
        System.out.println(s3[0]);
    }*/

 /*   public static void main2(String[] args) {
       *//* Array<String> array = new Array<>();
        array.set(0,"hello");
        System.out.println(array.get(0));
        Array<Integer> array2 = new Array<>();
        array2.set(0,99);
        System.out.println(array2.get(0));*//*

    }
        public static void main1(String[] args) {
        *//*int n = 5;
        for (int i = 31; i >=1 ; i-=2) {
            System.out.print((n>>i)&1);
        }
        System.out.println();
        for (int i = 30; i >=0 ; i-=2) {
            System.out.print((n>>i)&1);
        }*//*
        *//*int[] array={1,7,3,1,56,7,3,6,4};
        int[] array1={1,7,3,1,56,7,3,6,4};

        System.out.println(Arrays.toString(array));
        int[] copy = Arrays.copyOf(array,array.length);
        System.out.println(Arrays.toString(copy));
        int[] copy1 = Arrays.copyOf(array,array.length*2);
        System.out.println(Arrays.toString(copy1));
        int[] copy2 = Arrays.copyOfRange(array,0,5);
        System.out.println(Arrays.toString(copy2));
        int [] copy3 = new int[array.length];
        System.arraycopy(array,0,copy3,0,array.length);
        System.out.println(Arrays.toString(copy3));
        Arrays.sort(array);
        System.out.println(Arrays.toString(array));
        System.out.println(Arrays.equals(array1,array));
        int [] array2= new int[10];
        Arrays.fill(array2,1,5,9);
        System.out.println(Arrays.toString(array2));
        int[][]array5=new int[4][];
        array5[0]=new int[]{1,2,3};
        array5[1]=new int[]{2,3,4};
        System.out.println(Arrays.toString(array5[0]));
        System.out.println(Arrays.toString(array5[1]));
        System.out.println(Arrays.deepToString(array5));*//*
        *//*Integer a =127;
        Integer b =127;
        Integer c =128;
        Integer d =128;
        System.out.println(a==b);
        System.out.println(c==d);*//*
    }*/

   /* import java.util.*;

    public class Solution {

        public int[][] threeOrders (TreeNode root) {
            int[][] resList = new int[3][];
            List<Integer> list1 = new ArrayList<Integer>();
            List<Integer> list2 = new ArrayList<Integer>();
            List<Integer> list3 = new ArrayList<Integer>();

            preOrder(root,list1);
            inOrder(root,list2);
            postOrder(root,list3);

            resList[0] = new int[list1.size()];
            resList[1] = new int[list2.size()];
            resList[2] = new int[list3.size()];

            for(int i=0;i<list1.size();i++){
                resList[0][i] = list1.get(i);
                resList[1][i] = list2.get(i);
                resList[2][i] = list3.get(i);
            }
            return resList;
        }

        public void preOrder(TreeNode root,List<Integer> list){
            if(root != null){
                list.add(root.val);
                preOrder(root.left,list);
                preOrder(root.right,list);
            }
        }

        public void inOrder(TreeNode root,List<Integer> list){
            if(root != null){
                inOrder(root.left,list);
                list.add(root.val);
                inOrder(root.right,list);
            }
        }

        public void postOrder(TreeNode root,List<Integer> list){
            if(root != null){
                postOrder(root.left,list);
                postOrder(root.right,list);
                list.add(root.val);
            }
        }
    }*/

 /*   class Person{
        public  int age;
        public Person(int age){
            this.age=age;
        }
        {
            System.out.println("实例代码块");
        }
        static{
            System.out.println("静态代码块");
        }

    }

    class Student extends Person{
         public int age;
         public Student(int age){
             super(age);
             this.age=age;
         }
        {
            System.out.println("实例代码块");
        }
        static{
            System.out.println("静态代码块");
        }
}*/






class X{
    public void a(){
        System.out.println("Y");
    }
    public X(){
        System.out.println("X");
    }
}
class Z extends X{
    public void a(){
        System.out.println("Y");
    }
    public Z(){
        System.out.println("Z");
    }
    public static void main(String[] args) {
        new Z();
    }
}


























